<?php

error_reporting (E_ALL | E_STRICT);
date_default_timezone_set ('UTC');

include_once 'ccxt.php';

$keys = array(
			'okex3'=>array(
						'apiKey'=>'0aa7e5fe-3eb8-43e7-97b8-da594216f4c8',
						'secret'=>'ED27E16BE703A41FFE658F9AEE2AC985',
						'password'=>'123456'
					),
			);

$exchange_name = "okex3";

if(!isset($keys[$exchange_name]))
	die("exchange keys don't exsist");

$apiKey = $keys[$exchange_name]['apiKey'];
$secret = $keys[$exchange_name]['secret'];
$password = $keys[$exchange_name]['password'];

$className = "\ccxt\\".$exchange_name;

$exchange     = new $className    (array (
    'apiKey' => $apiKey,
    'secret' => $secret ,
    'password'=>$password,
));


$params = array('type'=>'swap');
$result = $exchange->fetch_balance($params);

var_dump($result);